<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var a=prompt("请输入数字")
    var b=prompt("请输入加减乘除")
    var c=prompt("请输入数字")
    var d 
    a=+a
    c=+c
    switch(b){
        case "+": 
            d=a+c;
            document.write(d);
            break;
        case "-": 
            d=a-c;
            document.write(d);
            break;
        case "*": 
            d=a*c;
            document.write(d);
            break;
        case "/": 
            d=a/c;
            document.write(d);
            break;
        default:
            document.write("请正确输入")
    }
</script>
</html>